#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

#define MAX 100

int main()

{

	int i = 1;

	int y = 0;

	for (i = 1; i <= MAX + 1; i++)

	{

		int num = 1;

		while ((i / (int)(pow(10, num))) >= 1)

		{

			num++;

		}

		int k = 0;

		for (k = 1; k <= num; k++)

		{

			if ((i / (int)pow(10, num - k) % (int)pow(10, k)) == 9)

			{

				y++;

			}

		}

	}

	printf("%d", y);

	return 0;

}